﻿<UserControl x:Class="Chat.MainPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignHeight="511"
             d:DesignWidth="520">

    <Grid x:Name="LayoutRoot"
          Background="White"
          Margin="0">
        <TextBlock Margin="8,8,0,0"
    		TextWrapping="Wrap"
    		Text="Host:"
    		HorizontalAlignment="Left"
    		VerticalAlignment="Top" />
    	<TextBox x:Name="txtHost"
    		TextChanged="EnableOperations"
    		Margin="74,4,0,0"
    		TextWrapping="Wrap"
    		Background="#E9FFFFFF"
    		BorderBrush="Black"
    		IsEnabled="True"
    		HorizontalAlignment="Left"
    		Width="131"
    		VerticalAlignment="Top"
                 Text="localhost" />
        <TextBlock Margin="8,38,0,0"
                   TextWrapping="Wrap"
                   Text="Topic ID:"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top" />
        <TextBox x:Name="txtTopic"
                 TextChanged="EnableOperations"
                 Margin="74,34,0,0"
                 TextWrapping="Wrap"
                 Background="#E9FFFFFF"
                 BorderBrush="Black"
                 IsEnabled="True"
                 HorizontalAlignment="Left"
                 Width="42"
                 VerticalAlignment="Top" />
        <TextBlock Margin="8,68,0,0"
                   TextWrapping="Wrap"
                   Text="Message:"
                   d:LayoutOverrides="HorizontalAlignment, GridBox"
                   HorizontalAlignment="Left"
                   Width="53"
                   VerticalAlignment="Top" />
        <TextBox x:Name="txtMessage"
                 KeyDown="txtMessage_KeyDown"
                 TextChanged="EnableOperations"
                 Margin="74,64,8,0"
                 TextWrapping="Wrap"
                 d:LayoutOverrides="HorizontalAlignment, GridBox"
                 BorderBrush="Black"
                 VerticalScrollBarVisibility="Auto"
                 IsEnabled="True"
                 Height="50"
                 VerticalAlignment="Top" />
        <StackPanel HorizontalAlignment="Left"
                    Margin="0,124,0,0"
                    Orientation="Vertical"
                    VerticalAlignment="Top"
                    Width="160">
            <Button x:Name="cmdStart"
        		Click="cmdStart_Click"
        		Content="Start client"
        		Margin="5"
        		IsEnabled="True" />
            <Button x:Name="cmdPolicy"
                    Click="cmdPolicy_Click"
        		Content="Verify Access Policy"
                    Margin="5"
                    IsEnabled="True" />
            <Button x:Name="cmdRunning"
                    Click="cmdRunning_Click"
                    Content="Is Laharsub running?"
                    Margin="5" />
            <Button x:Name="cmdCreate"
                    Click="cmdCreate_Click"
                    Content="Create topic"
                    Margin="5"
                    ToolTipService.ToolTip="Create a new topic" />
            <Button x:Name="cmdSubscribe"
                    Click="cmdSubscribe_Click"
                    Margin="5"
                    Content="Subscribe to topic" />
            <Button x:Name="cmdUnsubscribe"
                    Click="cmdUnsubscribe_Click"
                    Margin="5"
                    Content="Unsubscribe from topic" />
            <Button x:Name="cmdUnsubscribeAll"
                    Click="cmdUnsubscribeAll_Click"
                    Margin="5"
                    Content="Unsubscribe all" />
            <Button x:Name="cmdPublish"
                    Click="cmdPublish_Click"
                    Margin="5"
                    Content="Publish message"
                    ToolTipService.ToolTip="Publish the message to topic" />
            <Ellipse Fill="#FFF5512C"
                     HorizontalAlignment="Center"
                     Height="4"
                     Width="4"
                     VerticalAlignment="Center" />
            <Button x:Name="cmdSubscribeData"
                    Click="cmdSubscribeData_Click"
                    Margin="5"
                    Content="Subscribe Data" Foreground="#FFFF0707" FontStyle="Italic" />
            <Button x:Name="cmdPublishData"
            	Click="cmdPublishData_Click"
            	Margin="5"
            	Content="Publish Data"
            	ToolTipService.ToolTip="Publish custom data to topic" FontStyle="Italic" Foreground="Red" />
        </StackPanel>
        <TextBox x:Name="Chat"
                 Margin="166,122,9,8"
                 TextWrapping="Wrap"
                 IsReadOnly="True" />
    </Grid>
</UserControl>
